package leetcode.L500;

public class Ex168 {
    public String convertToTitle(int columnNumber) {
        StringBuffer res = new StringBuffer();
        while(columnNumber!=0){
            int now = columnNumber%26;
            columnNumber = columnNumber/26;
            char a = (char) ('A'+now-1);


            res.append(a);
        }
        res = res.reverse();
        return res.toString();

    }
}
